<?php

require_once './include/common.inc.php';

$page_title = 'jans2en furniture - Tradeshows - Tradeshows';
$menu_id = 10;
$postiondiv='<div class="position"><a href="index.php">Home</a> &gt; <span class="position"> Tradeshows</span></div>';
$baner_img='<img height="63" border="0" align="right" width="397" alt="Tradeshows" src="css/images/pagetitle_tradeshows.jpg">';
$baner_img='<div class="bigtitle">Tradeshows</div>';
//checkLogin();


// *** page code start ***
$page_url = 'tradeshows.php?';
$sql = "SELECT `id` FROM `tradeshows`";
$query = $db->query($sql);
$sql_all_num = $db->num_rows($query);

$ppp = 50;
getMyParam('page');
$page = empty($page) || !ispage($page) ? 1 : $page;
$start_limit = ($page - 1) * $ppp;
if($start_limit > $sql_all_num) {
    $start_limit = 0;
    $page = 1;
}

$page_show = getPhotoPageStr($sql_all_num, $page, $ppp, $page_url, 'tradeshows');
// *** page code end ***

$sql = "SELECT `id`, `date`, `show`, `location`, `country`,`city`, `booth`, `company` FROM `tradeshows` WHERE `sdate`> $timestamp ORDER BY `sdate` ASC LIMIT $start_limit, $ppp"; 
$query = $db->query($sql);
while($rs = $db->fetch_array($query)) {
    $out_ary[] = $rs;
}

// -------------- guideͼƬ start ----------------------------------------
$system_ary = getSystemValue("");
$guide_pic = $system_ary['picture_tradeshows'];
if (trim($guide_pic) == "" || !file_exists("./zh/attachments/system/" . $guide_pic)) {
    $guide_pic = './zh/attachments/system/no_guide.gif';
} else {
    $guide_pic = './zh/attachments/system/' . $guide_pic;
}
// -------------- guideͼƬ end ------------------------------------------

	browseTracking(16,0,'Home > Tradeshows');
require_once PrintEot('header');
require_once PrintEot('tradeshows');
require_once PrintEot('footer');

?>